home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.src.lzh / libc / closeall.c < prev    next >
C/C++ Source or Header  |  1989-07-05  |  325b  |  21 lines

  1. #ifndef AMIGA
  2. # include <sys/param.h>
  3. #else
  4. # include <stdio.h>
  5. # ifndef MCH_AMIGA
  6. #   define NOFILE _NFILE            /* For Lattice */
  7. # else
  8. #   define NOFILE MAXSTREAM            /* For Manx */
  9. # endif
  10. #endif /* AMIGA */
  11.  
  12. void
  13. closeall(leavestd)
  14. int leavestd;
  15. {
  16.     register int i;
  17.  
  18.     for (i = (leavestd? 3: 0); i < NOFILE; i++)
  19.         close(i);
  20. }
  21.